package gateway.service;

import gateway.pojo.GatewayApiDefine;
import gateway.repository.GatewayRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GatewayService {

    @Autowired
    private GatewayRepository gatewayRepository;

    public List<GatewayApiDefine> getGateways(){
        return  gatewayRepository.findAll();
    }

    public GatewayApiDefine insertGateway(GatewayApiDefine gatewayApiDefine){
        return  gatewayRepository.save(gatewayApiDefine);
    }

}
